<template>
  <div class="boxwrap">
     <Parent v-if="parentData.parent" :parentData="parentData.parent" @parentCallReply="acceptId">{{parentData.content}}</Parent>
     <div class="firstThen">
       <div class="box">
      <div class="anthor">
        <span>{{parentData.user.nickname}}</span>
        <p class="time">1个小时前</p>
      </div>
      <i class="followBtn" @click="sellId(parentData.id)">回复</i>
    </div>
    <div class="info">
      {{parentData.content}}
      </div>
     </div>
  </div>
</template>

<script>
export default {
  name:'Parent',
  props: ["parentData"],
  methods:{
    sellId(id){
      // console.log('点击了');
      // console.log(id);
      this.$emit('parentCallReply',id)
    },
    acceptId(parentId){
      //  console.log('点击了');
     this.$emit('parentCallReply',parentId);
    }
  }
};
</script>

<style lang="less" scoped>
.firstThen {
   border: 1/360 * 100vw solid #afafaf;
   padding: 10/360 * 100vw;
   &:nth-child(n+2){
     border-top: transparent;
   }
  .box {
    display: flex;
    justify-content: space-between;
    font-size: 12/360 * 100vw;
    .anthor {
      display: flex;
      align-items: center;
      .time {
        margin-left: 10/360 * 100vw;
        color: #afafaf;
      }
    }
    .followBtn {
      color: #afafaf;
    }
  }
  
  .info {
    margin-top: 10/360*100vw;
  }
}
</style>